package com.ssyt.hiringtwo.entity;

import java.util.Calendar;
import java.util.Date;

public class PositionEntity {

    private int id;
    private int userId;
    private String name;
    private int salaryBegin;
    private int salaryEnd;
    private String provinceCode;
    private String cityCode;
    private int workExperience;
    private int education;
    private Date publishTime;
    private String job;
    private String duty;
    private String treatment;
    private int validDays;
    private Date editTime;

    // 扩展字段
    private String company$name;
    private String trade$name;
    private String company$nature;
    private String company$purpose;
    private String city$name;
    private String province$name;
    private String workExperienceStr;
    private String educationStr;
    private String[] treatments;
    private int allResumeDeliveryCount;//收到的简历数
    private int unreadResumeCount;//未读的简历数
    private int unhandleResumeCount;//未处理的简历数 
    private Date outDate;//过期时间
    
    //查询公司职业详情的扩展字段补充
    private String company$logo;
    private String company$size;
    private String company$linkman;
    private String company$phone;
    private String company$address;

    public String getCompany$nature() {
        String companyNature = "";
        switch (company$nature) {
            case "1":
                companyNature = "民营企业";
                break;
            case "2":
                companyNature = "国有企业";
                break;
            case "3":
                companyNature = "外资企业";
                break;
            default:
                companyNature = "其它";
                break;
        }
        return companyNature;
    }

    public String getWorkExperienceStr() {
        String workExperienceStr = "";
        switch (workExperience) {
            case 1:
                workExperienceStr = "实习生";
                break;
            case 2:
                workExperienceStr = "应届毕业生";
                break;
            case 3:
                workExperienceStr = "1~3年";
                break;
            case 4:
                workExperienceStr = "3~5年";
                break;
            case 5:
                workExperienceStr = "5~10年";
                break;
            case 6:
                workExperienceStr = "10年以上";
                break;
            default:
                workExperienceStr = "经验不限";
                break;
        }
        return workExperienceStr;
    }

    public String getEducationStr() {
        String educationStr = "";
        switch (education) {
            case 1:
                educationStr = "大专";
                break;
            case 2:
                educationStr = "本科";
                break;
            case 3:
                educationStr = "硕士";
                break;
            case 4:
                educationStr = "博士";
                break;
            case 5:
                educationStr = "其它";
                break;
            default:
                educationStr = "学历不限";
                break;
        }
        return educationStr;
    }
    
    public String getCompany$sizeStr() {
        String companySize = "";
        switch (company$size) {
            case "1":
                companySize = "50人以下";
                break;
            case "2":
                companySize = "51~100人";
                break;
            case "3":
                companySize = "101~500人";
                break;
            case "4":
                companySize = "501~1000人";
                break;
            default:
                companySize = "1000人以上";
                break;
        }
        return companySize;
    }
    
    
    public Date getOutDate() {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(publishTime);
        calendar.add(Calendar.DATE, validDays);
        return calendar.getTime();
    }

    public void setOutDate(Date outDate) {
        this.outDate = outDate;
    }

    public String[] getTreatments() {
        return treatment.split(",");
    }

    public void setTreatments(String[] treatments) {
        this.treatments = treatments;
    }

    public String getTreatment() {
        return treatment;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSalaryBegin() {
        return salaryBegin;
    }

    public void setSalaryBegin(int salaryBegin) {
        this.salaryBegin = salaryBegin;
    }

    public int getSalaryEnd() {
        return salaryEnd;
    }

    public void setSalaryEnd(int salaryEnd) {
        this.salaryEnd = salaryEnd;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public int getWorkExperience() {
        return workExperience;
    }

    public void setWorkExperience(int workExperience) {
        this.workExperience = workExperience;
    }

    public int getEducation() {
        return education;
    }

    public void setEducation(int education) {
        this.education = education;
    }

    public Date getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public String getDuty() {
        return duty;
    }

    public void setDuty(String duty) {
        this.duty = duty;
    }

    public void setTreatment(String treatment) {
        this.treatment = treatment;
    }

    public int getValidDays() {
        return validDays;
    }

    public void setValidDays(int validDays) {
        this.validDays = validDays;
    }

    public String getCompany$name() {
        return company$name;
    }

    public void setCompany$name(String company$name) {
        this.company$name = company$name;
    }

    public String getTrade$name() {
        return trade$name;
    }

    public void setTrade$name(String trade$name) {
        this.trade$name = trade$name;
    }

    public void setCompany$nature(String company$nature) {
        this.company$nature = company$nature;
    }

    public String getCompany$purpose() {
        return company$purpose;
    }

    public void setCompany$purpose(String company$purpose) {
        this.company$purpose = company$purpose;
    }

    public String getCity$name() {
        return city$name;
    }

    public void setCity$name(String city$name) {
        this.city$name = city$name;
    }

    public void setWorkExperienceStr(String workExperienceStr) {
        this.workExperienceStr = workExperienceStr;
    }

    public void setEducationStr(String educationStr) {
        this.educationStr = educationStr;
    }

    public int getAllResumeDeliveryCount() {
        return allResumeDeliveryCount;
    }

    public void setAllResumeDeliveryCount(int allResumeDeliveryCount) {
        this.allResumeDeliveryCount = allResumeDeliveryCount;
    }

    public int getUnreadResumeCount() {
        return unreadResumeCount;
    }

    public void setUnreadResumeCount(int unreadResumeCount) {
        this.unreadResumeCount = unreadResumeCount;
    }

    public int getUnhandleResumeCount() {
        return unhandleResumeCount;
    }

    public void setUnhandleResumeCount(int unhandleResumeCount) {
        this.unhandleResumeCount = unhandleResumeCount;
    }

    public String getProvince$name() {
        return province$name;
    }

    public void setProvince$name(String province$name) {
        this.province$name = province$name;
    }

	public Date getEditTime() {
		return editTime;
	}

	public void setEditTime(Date editTime) {
		this.editTime = editTime;
	}

	public String getCompany$logo() {
		return company$logo;
	}

	public void setCompany$logo(String company$logo) {
		this.company$logo = company$logo;
	}

	public String getCompany$size() {
		return company$size;
	}

	public void setCompany$size(String company$size) {
		this.company$size = company$size;
	}

	public String getCompany$linkman() {
		return company$linkman;
	}

	public void setCompany$linkman(String company$linkman) {
		this.company$linkman = company$linkman;
	}

	public String getCompany$phone() {
		return company$phone;
	}

	public void setCompany$phone(String company$phone) {
		this.company$phone = company$phone;
	}

	public String getCompany$address() {
		return company$address;
	}

	public void setCompany$address(String company$address) {
		this.company$address = company$address;
	}
    

}
